﻿using System;
using Chromium.Remote;

namespace Kugar.UI.RazorUI.Exceptions
{
    public class JsCodeExecuteException : ApplicationException
    {
        private CfrV8Exception _error = null;

        public JsCodeExecuteException(CfrV8Exception error)
        {
            _error = error;
        }

        public override string Message => _error.Message;

        public string SourceLine => _error.SourceLine;

        public string ScriptResourceName => _error.ScriptResourceName;

        public int LineNumber => _error.LineNumber;

        public int StartPosition => _error.StartPosition;

        public int EndPosition => _error.EndPosition;

        public int StartColumn => _error.StartColumn;

        public int EndColumn => _error.EndColumn;
    }
}